<?php 

include_once("./_common.php");

$sql1 = "SELECT		wr_subject, wr_id
		 FROM		g4_write_event
		 WHERE		wr_is_comment = '0'
		 ORDER BY	wr_id DESC";
$rst1 = sql_query($sql1);
while($row1 = mysql_fetch_assoc($rst1)) {
	$subj[] = $row1;
}
//$lately_event_total = count($subj);

?>
<script type="text/javascript">
<!--

//-->
$(".subj").change(function(){
	$.ajax({
		type: "POST",
		url: "./ajax_eventclick.php",
		data: {
			a : $(this).val()
		},
		success: function(data) {
			$(".input_event_td3").html(data);
		},
		dataType: "html"
	});
});

</script>


<select name="subj" class="subj">
<?php
for($i = 0; $i < count($subj); $i += 1) { ?>
<option value="<?php echo $subj[$i]['wr_id']?>" <?php echo $subj[$i]['wr_id'] == $lately_event_total ? "selected" : ""?>> <?php echo $subj[$i]['wr_subject']?> </option>
<? } ?>
</select>

